﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DisplayBoardInfo.Server.Forms.Board
{
    /// <summary>
    /// Interaction logic for Row.xaml
    /// </summary>
    public partial class Row : UserControl
    {
        public Row()
        {
            InitializeComponent();
        }

        public int PatientNumber
        {
            get
            {
                return Int32.Parse(number.Content.ToString());
            }

            set
            {
                Helpers.WPF.FadeOutAnimation(number, this);
                number.Content = value;
                Helpers.WPF.FadeInAnimation(number, this);
            }
        }

        public string PatientName
        {
            get
            {
                return name.Content.ToString();
            }

            set
            {
                Helpers.WPF.FadeOutAnimation(name, this);
                name.Content = value;
                Helpers.WPF.FadeInAnimation(name, this);
            }
        }

        public int Time
        {
            get
            {
                return Int32.Parse(time.Content.ToString());
            }

            set
            {
                Helpers.WPF.FadeOutAnimation(time, this);
                time.Content = value;
                Helpers.WPF.FadeInAnimation(time, this);
            }
        }

        public void Empty()
        {
            Helpers.WPF.FadeOutAnimation(name, this);
            name.Content = "--Brak--";
            number.Content = "-";
            Helpers.WPF.FadeInAnimation(name, this);
        }
    }
}
